Computer system

ABSTRACT

A computer system according to this invention makes it possible to perform initial loading of files directly from an auxiliary memory according to a check code in a management table in a battery-backed-up memory. In direct file loading, the auxiliary memory is accessed as per physical addresses and sizes of each of the blocks constituting each file to be loaded. This direct reading of necessary files enables to reduce significantly the number of times the auxiliary memory is accessed for the purpose, thereby shortening the time required for initial loading of the files.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a computer system which shortens thetime required for initial loading of files.

2. Description of the Prior Art

FIG. 1 is a block diagram showing a prior art computer system. In FIG.1, reference numeral 1 is a processor that controls the entire computersystem; numeral 2 is a ROM (read only memory) which, for use by theprocessor 1, contains a program for initial program loading; numeral 3is a RAM (random access memory) to which the processor 1 loads filesneeded to be processed; numeral 4 is a disk that acts as an auxiliarymemory containing various files including those to be loaded to the RAM3; and numeral 5 is a disk interface connected to the disk 4.

FIG. 2 is a view illustrating how various files are stored on the disk4, and FIG. 3 is a view indicating how these files are arranged inhierarchical format. In these figures, reference numerals 10-12 are#1-#3 program files to be loaded to the RAM 3, and numerical 13 is aroot directory and #1-#6 directory files defining the hierarchicalstructure of the program files 10-12.

In operation, applying power to the computer system allows the processor1 to execute the program stored in the ROM 2. In this example, theprogram in the ROM 2 loads the #1 program file 10 through #3 programfile 12 to the RAM 3.

The root directory 13 is read from the disk 4, the contents of thedirectory being analyzed to find the location where the #1 directoryfile 14 is stored. The #1 directory file 14 is read from the locationthus acquired. In turn, the contents of the file 14 are analyzed to findthe location where the #1 program file 10 to be loaded is stored. Fromthe location thus obtained, the #1 program file 10 is read and loaded tothe RAM 3 via the disk interface 5.

When the loading of the #1 program file 10 is completed, the rootdirectory 13 is again read in order to load the #2 program file 11. Inthe same manner, subsequent files in the hierarchical structure aresuccessively traced, from the #2 directory file 15 to #3 directory file16 and so on, until the location where the #2 program file 11 isacquired. When read out, the #2 program file 11 is loaded to the RAM 3.In this case, because the #2 program file 11 is hierarchically lowerthan the #1 program file 10, the disk 4 needs to be accessed more oftenthan in the case of the #1 program file in order to find the locationwhere the #2 program file 11 is stored.

Since the #3 program file 12 is still lower in the file hierarchy, thefour directory files, from the root directory 13 to #4-#6 directoryfiles 17-19, are read out, their contents being analyzed to acquire thelocation where the #3 program file 12 is stored. From that location the#3 program file 12 is read and loaded to the RAM 3.

Because the prior art computer system is typically constructed asoutlined above, one problem therewith is that the disk 4 needs to beaccessed a very large number of times in order to load the object fileto the RAM 3. The prolonged loading time means that the computer systemmust remain functionally idle for the duration of that time, i.e.,between the time it is powered up and the time it is ready for use.

SUMMARY OF THE INVENTION

It is therefore an object of the present invention to provide a computersystem that speeds up the initial loading of files.

In carrying out the above object, there is provided a computer systemcomprising a memory, an auxiliary memory and a processor, the memorybeing backed up by battery and containing a management table, themanagement table containing a physical address and a physical size, inthe auxiliary memory, of each of blocks making up the file to be loaded,the table further containing a check code indicating whether each of thefile's information is properly stored, the processor having a judgingmeans which, upon loading a file, examines the corresponding check codein the table to see if the file is to be loaded according to theconventional file selection method or in a direct manner as per thephysical addresses and sizes contained in the table.

Further objects and advantages will be apparent from the followingdescription and the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of the representative prior art computersystem;

FIG. 2 is a schematic view showing how various files are stored on adisk in the prior art computer system;

FIG. 3 is a view depicting how the files are arranged in a hierarchicalstructure in the prior art computer system.

FIG. 4 is a block diagram of a preferred embodiment of the invention;

FIG. 5 is a schematic view showing how a file to be loaded is dividedinto blocks for storage on the disk 4 of the embodiment;

FIG. 6 is a view illustrating how a management table is allocated in theembodiment; and

FIG. 7 is a flowchart showing steps of initial file loading executed bythe processor in the embodiment.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

The preferred embodiment of the present invention will now be describedby referring to the accompanying drawings. In FIG. 4, reference numeral2 is a ROM; numeral 3 is a RAM; numeral 4 is a disk that acts as anauxiliary memory; and numeral 5 is a disk interface. In FIGS. 1 and 5,like reference characters designate like or corresponding parts, and anyrepetitive descriptions thereof are omitted.

Reference numeral 6 is a battery independent of the power source for thecomputer system; numeral 7 is a nonvolatile memory (RAM) which, backedup by the battery 6, retains its contents when the computer system ispowered off; and numeral 8 is a management table which contains thephysical address and size of each of the blocks making up each file tobe loaded, as well as a check code indicating whether the file'sinformation has its contents properly retained.

Reference numeral 9 is a judging means which, when the processor loads afile from the disk 4 into the RAM 3, examines the corresponding checkcode in the management table 8 to see if the file is to be loaded by theconventional file selection method or in a direct manner as per theappropriate physical addresses and sizes. The processor 1 differs fromits counterpart in FIG. 1 in that the former possesses the judging means9.

FIG. 5 schematically shows how a program file to be loaded is dividedinto blocks and stored on the disk 4. In this figure, reference numeral20 is the program file to be loaded, and numerals 21-23 are #1 block, #2block and #n block, respectively, of the program file 20 stored on thedisk 4. The program file 20 is a sequential file which, logically agroup of sequentially continuous data as illustrated, may or may not bestored continuously depending on the use status of the disk 4. That is,a sequential file is generally stored in free blocks on the disk 4, theblocks being usually separated from one another, each block generallycomprising a plurality of contiguous sectors on the disk. In the exampleshown, the program file 20 is divided into "n" blocks for storage, i.e.,#1 block 21 through #n block 23 to be suitably stored into free space ofthe disk 4.

If the contents of the program file 20 are altered or supplemented, thelocations of the blocks 21-23 and the sizes thereof vary; if thecontents of the file remain unchanged, the locations and the sizes, ofits blocks also stay unchanged. Therefore, when any file other than theprogram file 20 is generated, altered or deleted in the system, thelocations of the blocks constituting the program file 20 are secured onthe disk 4 as long as the contents thereof remain unchanged.

FIG. 6 depicts how the management table 8 mentioned above is structured.In FIG. 6, reference numeral 30 is a memory area that contains the checkcode indicating whether the contents of the management table 8 areproperly retained. The check code may be a cyclic redundancy check (CRC)code. Reference numeral 31 is a memory area that contains the size ofthe management table 8. Numerals 32-34 are memory areas containing thephysical addresses and sizes, on the disk 4, of the blocks constitutingthe #1 program file through #3 program file to be loaded.

FIG. 7 shows in flowchart format how the initial loading of programfiles is carried out. In operation, the computer system is powered up tostart the initial loading of program files. In step ST1, the processor 1generates a check code relative to the size data recorded in the memoryarea 31 of the management table 8. In step ST2, the processor comparesthe check code thus generated with another check code stored in thememory area 30 at the top of the management table 8.

At this point, the contents of the management table 8 are not correctfor a first initial loading only. Thus the comparison in step ST2results in a mismatch, causing the processor 1 to enter step ST3. Instep ST3, the processor searches for the #1 program file using theconventional file selection method. That is, the search begins at theroot directory and proceeds to other directly files therebelow in thehierarchy. The #1 program file is read and loaded to the RAM 3 via thedisk interface 5. At the same time, the physical address and size ofeach of the blocks making up the #1 program file on the disk 4 arestored consecutively into the memory area 32 of the management table 8.In steps ST4 and ST5, the search, read and load operations are performedin the same manner on the #2-#3 program files. The program files thatwere read are loaded into the RAM 3, and the necessary entries are madeinto the management table 8.

When the loading of the program files is completed, the processor 1 goesto step ST6. In step ST6, the processor 1 totals the sizes in the memoryareas 32-34, and stores the result into the memory area 31 as themanagement table size. In step ST7, a check code is generated accordingto the contents of the memory areas 32-34, and is set to the memory area30 at the top of the management table 8. Thereafter, control istransferred to the loaded program so that the computer system mayperform the processing for which the computer system is primarilyresponsible.

When the computer systems is reset or powered to restart, followed byanother initial loading of program files, the processor 1 enters stepST1 as before. In step ST1, a check code is generated. In step ST2, acomparison is made between the generated check code and another checkcode stored in the memory area 30. In this case, the contents of themanagement table 8 are backed up properly and thus remain unchanged.Therefore the comparison results in a match, and the processor goes tostep ST8.

In step ST8, the processor 1 reads from the memory area 32 of themanagement table 8 the physical address and size of each of the blocksmaking up the #1 program file on the disk 4. In accordance with theinformation thus retrieved, the head on the disk 4 is directlycontrolled to read consecutively the blocks constituting the #1 programfile, the blocks being loaded into the RAM 3 via the disk interface 5.When the loading of the #1 program file is completed, the #2 programfile and the #3 program file are loaded in steps ST9 and ST10,respectively, in the same manner as above.

When the direct loading of all program files is completed according tothe management table 8, control is transferred to the loaded program.This allows the computer system to start the processing for which thecomputer system is primarily responsible.

If any of the files on the disk 4, subject to initial loading, isaltered, deleted or otherwise changed in contents, at least the memoryarea 30 containing the check code is erased. This causes, upon the nextpass of initial file loading, the processor 1 to go from step ST2 tostep ST3. As described, the processor 1 in step ST3 loads the file usingthe conventional file selection method and updates the management table8. If the files subject to initial loading undergo no change at all, theprocessor 1 always goes from step ST2 to step ST8. There the processor 1directly loads the file using the management table 8.

As indicated, the computer system according to the present inventionexamines a check code in its management table to determine in whatmanner the corresponding file is to be loaded. For direct file loading,the disk is accessed for retrieval of the target file whose physicaladdresses and sizes are referred to in the management table in units ofblocks, the addresses and sizes defining the location of the file on thedisk. This eliminates the need for loading each necessary file after alengthy sequential search starting from the root directory duringinitial program loading. Because the number of times the disk isaccessed is drastically lowered, the time required for the initialloading of files is significantly reduced.

It is to be understood that while the invention has been described inconjunction with a specific embodiment, it is evident that manyalternatives, modifications and variations will become apparent to thoseskilled in the art in light of the foregoing description. Accordingly,it is intended that the present invention embrace all such alternatives,modifications and variations as fall within the spirit and scope of theappended claims.

What is claimed is:
 1. A computer system comprising:a main memory meansto which a file is loaded when said system is powered on or reset; anauxiliary memory means for storing said file in units of blocks; amemory means, backed up by a battery, for storing a management tablewhich contains physical addresses and sizes of each of said blocks ofsaid file on said auxiliary memory means, and a check code for checkingto see if the contents of said file's information are properly retained;and a judging means, based on said check code in said management table,for deciding whether said file is to be loaded from said auxiliarymemory means to said main memory means in accordance with a conventionalfile selection method or in a direct manner as per said physicaladdresses and sizes found in said management table.
 2. An apparatus asclaimed in claim 1 wherein the main memory means comprises a randomaccess memory.
 3. An apparatus as claimed in claim 1 wherein theauxiliary memory means is selected for the group consisting of amagnetic disk device, an optical read/write device, and a magnetic tapedevice.
 4. An apparatus as claimed in claim 1 wherein the memory meanscomprises a random access memory.
 5. A method for initial loading ofcomputer program files into a computer main memory which comprises thesteps of:providing a computer system with at least a main memory, anauxiliary memory, a memory backed-up by battery power, and a judgingmeans for comparing a check code with auxiliary memory contents;providing said auxiliary memory with said program files; creating amanagement table containing file location and file size data of all saidfiles on said auxiliary memory, the size of said management table, and acheck code; storing said management table in said memory backed-up bybattery power; comparing said check code with auxiliary memory contentsfor establishing the accuracy of said management table; loading saidprogram files either in accordance with conventional file selectionmethod or in a direct manner as per said file location and said filesize data found in said management table based on said comparison ofsaid check code with said auxiliary memory contents.
 6. A method asclaimed in claim 5 wherein the steps of comparing said check codefurther comprises:initializing said computer system; computing file dataof said auxiliary memory; reading said check code from said managementtable; and comparing said check code with said file data of saidauxiliary memory for equivalency.
 7. A method as claimed in claim 6wherein the step of loading said program files further comprises:loadingsaid program files from said file location and said file size datastored in said management table when said check code is equivalent tosaid file data; loading said program file in accordance with saidconventional file selection method when said check code is notequivalent to said file data; and rewriting said management table whensaid check code is not equivalent to said file data.